home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / plug-ins / perl / configure.in < prev    next >
Encoding:
Text File  |  2000-08-24  |  2.3 KB  |  80 lines

  1. AC_INIT(config.pl.in)
  2.  
  3. if test -z "$IN_GIMP"; then
  4.    echo
  5.    echo "*** WOAH there! ***"
  6.    echo Please do NOT call configure directly, rather run
  7.    echo perl Makefile.PL
  8.    echo as you would do with any other perl extension...
  9.    echo "This time I'll be doing it for you!"
  10.    echo
  11.    perl Makefile.PL
  12.    exit
  13. fi
  14.  
  15. AC_PREFIX_DEFAULT($prefix)dnl from Makefile.PL
  16.  
  17. AC_CONFIG_HEADER(config.h)
  18.  
  19. AC_ARG_WITH(cflags,  [  --with-cflags=FLAGS     Set CFLAGS to FLAGS (optional)],
  20.    CFLAGS="$with_cflags")
  21.  
  22. AC_ARG_WITH(ldflags, [  --with-ldflags=FLAGS    Set LDFLAGS to FLAGS (optional)],
  23.    LDFLAGS="$with_ldflags")
  24.  
  25. AC_ARG_WITH(includes,[  --with-includes=DIR     Additionally search for includes in dir DIR (optional)],
  26.    CPPFLAGS="$CPPFLAGS -I$with_includes")
  27.  
  28. AC_ARG_WITH(libs,    [  --with-libs=DIR         Additionally search for libraries in dir in DIR (optional)],
  29.    LIBS="$LIBS -L$with_libs")
  30.  
  31. AC_PATH_PROGS(GIMP,gimp)
  32.  
  33. AM_PATH_GIMP(1.0.4,, AC_MSG_WARN(
  34. ** unable to find gimp, make sure it's in your path (version 1.0.4+ required!)
  35. ** You can get the gimp from ftp://ftp.gimp.org/pub/gimp.
  36. ))
  37.  
  38. gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \
  39.    sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  40. gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \
  41.    sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  42.  
  43. if test $gimptool_major_version -lt 2 && test $gimptool_minor_version -lt 1 ; then
  44.    echo
  45.    echo '** you are using a too old version of gimp (this includes all _stable_'
  46.    echo '** 1.0.x versions!). While this plug-in should still compile with the'
  47.    echo '** released 1.0.x versions of the gimp, many scripts will not, since they'
  48.    echo '** already use the new API.'
  49.    echo
  50. fi
  51.  
  52.  
  53. AM_PATH_GLIB(1.2.0,, AC_MSG_ERROR(
  54. ** unable to find glib, make sure it's in your path (version 1.2.0+ required!)
  55. ** You can get glib from ftp://ftp.gtk.org/pub/glib.
  56. ))
  57.  
  58. ac_gimp_save_CPPFLAGS="$CPPFLAGS"
  59. CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS"
  60. AC_EGREP_CPP(DIVIDE_MODE,[#include <libgimp/gimp.h>],AC_DEFINE(HAVE_DIVIDE_MODE))
  61. AC_CHECK_HEADERS(libgimp/gimpmodule.h libintl.h)
  62. CPPFLAGS="$ac_gimp_save_CPPFLAGS"
  63.  
  64. AC_CHECK_HEADERS(unistd.h)
  65.  
  66. CONFIG_H="config.h"
  67.  
  68. sinclude(configure.frag)
  69.  
  70. INTLLIBS=
  71. MSGFMT=
  72. AC_SUBST(INTLLIBS)
  73. AC_SUBST(MSGFMT)
  74.  
  75. AC_OUTPUT(config.pl)
  76.  
  77. echo "now invoking perl to complete the configuration..."
  78. exec $PERL $MAKEFILE_PL --writemakefile PREFIX="$prefix"
  79.  
  80.